package com.study.streamApi;

import com.study.methodcontrucet.Employee;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author yangyanbin
 * @since 20221115
 **/
public class StreamTest3 {

    @Test
    public void testStreamNotNull() {
        List<Employee> employeeList = new ArrayList<>();
        List<Integer> idList = employeeList.stream().filter(entry -> entry != null).map(Employee::getId).collect(Collectors.toList());
        System.out.println("idList = " + idList);
    }
}
